const defaultState = {
    visible: false,
    loading: false,
    model: {"currency": "无需转换"},
    rateData:[]
};
export default function exportPayable(state = defaultState, action) {
    const {type, payload} = action;
    switch (type) {
        case 'GH_ORDER.SHOW_EXPORT':
            return {...state, visible: true, rateData:[]};
        case 'GH_ORDER.HIDE_EXPORT':
            return {...state, visible: false, rateData:[]};
        case 'GH_ORDER.UPDATE_EXPORT_MODEL':
            return {...state, model: {...payload}};
        case 'GH_ORDER.UPDATE_RATE_DATA':
            return {...state, rateData: [...payload]};
        case 'GH_ORDER.EXPORT_PENDING':
            return {...state, loading: true};
        case 'GH_ORDER.EXPORT':
            return {...state, loading: false};
        default:
            return state;
    }
}

